﻿@using EasyUIMvc
@using EasyUIMvc.ComboBox
@using EasyUIMvc.Samples.App_Start
@{
    ViewBag.Title = "ComboGrid";
}

<h2>ComboGrid</h2>
@Html.EasyUI().ComboGrid(settings =>
                      {
                          settings.Id = "ComboGrid";
                          settings.Style = "width:300px";
                          settings.DataOption = new ComboDataOption 
                          {
                              AutoFitComlumn = true, 
                              PanelWidth = 500, 
                              ValueMember = "itemid", 
                              DisplayMember = "productname", 
                              UrlJsonDataSource = "../datagrid_data1.json", 
                              Method = "get", 
                              ColumnName = new[] {"itemid", "productname", "listprice", "unitcost", "attr1", "status"}, 
                              ColumnText = new[] {"Mã mục", "Tên sản phẩm", "Giá", "Đơn vị", "Thuộc tính", "Tình trạng"}, 
                              ColumnWidth = new short[] {80, 120, 80, 80, 200, 60}, 
                              ColumnTextAlign = new[]
                                                {
                                                    EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Default),
                                                    EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Default),
                                                    EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Right),
                                                    EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Right),
                                                    EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Default),
                                                    EnumHelper.GetEnumDescription(EnumHelper.AlignEnum.Center)
                                                }
                          };
                      }).GetHtml()



